package top.carrotguo.weibo.retrofit.api;

import java.util.HashMap;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import top.carrotguo.weibo.bean.CommentListBean;
import top.carrotguo.weibo.bean.CommentResultBean;
import top.carrotguo.weibo.bean.SendCommentBean;
import top.carrotguo.weibo.utils.StringUtils;

public interface CommentService {
    //根据微博ID返回某条微博的评论列表
    @GET("comments/show.json")
    Call<CommentListBean> getComments(@Query("access_token") String accessToken, @Query("id") String id,
                                      @Query("count") int count, @Query("page") int page);

    //对一条微博进行评论
    @POST("comments/create.json")
    @FormUrlEncoded
    Call<CommentResultBean> sendComment(@Field("access_token") String accessToken,
                                        @Field("comment") String comment,
                                        @Field("id") String id);
}

